%constantes
syms er_0
syms er_1
syms er_2
syms er_1/239
syms er_1/5
syms er_4
%operaciones
syms er_x_1
syms er_+_2
syms er_^_3
syms er_/_4
syms er_x_5
syms er_+_6
syms er_^_7
syms er_/_8
syms er_x_9
syms er_+_10
syms er_^_11
syms er_/_12
syms er_+_13
syms er_+_14
syms er_x_15
syms er_+_16
syms er_^_17
syms er_/_18
syms er_x_19
syms er_+_20
syms er_^_21
syms er_/_22
syms er_x_23
syms er_+_24
syms er_^_25
syms er_/_26
syms er_+_27
syms er_+_28
syms er_x_29
syms er_-_30
syms er_x_31

F1 = 2 * er_0 + er_x_1
F2 = F1 + er_1 + er_+_2
F3 = er_1/329 + (-log(239))*(1/239) * F2 + er_^_3
F4 = F3 - 239 * F2 + er_/_4
F5 = er_2 + 2* er_1 + er_x_5
F6 = F5 + er_1 + er_+_6
F7 = 3 * (1/239)^3 * er_1/239 + (-log(239))*(1/239)^3 * F6 + er_^_7
F8 = 1/3 * F7 - 239^3 F6 + er_/_8
F9 = 4 * er_2 + er_x_9
F10 = F9 + er_1 + er_+_10
F11 = 5 * (1/239)^4 * er_1/239 + (- log(239))*(1/239)^5 * F10 + er_^_11
F12 =  1/5 * F11 - 239^5 * F10 + er_/_12
F13 = F8 + F4 * er_+_13
F14 = F12 + F13 + er_+_14
F15 = 2 * er_0 + er_x_15
F16 = F15 + er_1 * er_+_16
F17 = er_1/5 + (-log(5))*(1/5) * F16 + er_^_17
F18 =  F17 - 1/5  * F16 + er_/_18
F19 = er_2 + 2 * er_1 + erx_19
F20 = F19 + er_1 + er_+_20
F21 = 3 * (1/5)^2 * er_1/5 + (-log(5))*(1/5)^3 
F22 = 1/3 * F21 - 5^3 * F20 + er_/_22
F23 = 4 * er_2 + er_x_23
F24 = F23 + er_1 + er_+_24
F25 = 5 * (1/5)^4 * er_1/5 + (-log(5)) * (1/5)^5 * F24 + er_^_25
F26 = 1/5 * F25 - 5^5 * F24 + er_/_26
F27 = F22 + F18 + er_+_27
F28 = F26 + F27 + er_+_28
%-----------------------------------------
A2_1 = 0;
x = 1/5
%num
%dem
%coc
%aux
n = 0;
while(n < 3)
    if (mod(n,2) == 0);
            num = x^(2*n+1);
    else
            num = (-1)*(x^(2*n+1));        
    end
    dem = 2*n+1;
    coc = num/dem
    A2_1 = A2_1 + coc;
    n = n+1;
end
%--------------------------------------------------
A2_2 = 0;
x = 1/239
%num
%dem
%coc
%aux
n = 0;
while(n < 3)
    if (mod(n,2) == 0);
            num = x^(2*n+1);
    else
            num = (-1)*(x^(2*n+1));        
    end
    dem = 2*n+1;
    coc = num/dem
    A2_2 = A2_2 + coc;
    n = n+1;
end
%--------------------------------------------------
M2 = 4* A2_1 - A2_2
%------------------------------------------------
F29 = A2_1 * er_4 + 4* F28 + er_x_29
F30 = F29 - F14 + er_-_30
F31 = M2 * er_4 + 4 * F30 + er_x_31
